package com.danskin.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.danskin.wechat.dao.CategoryProductDao;
import com.danskin.wechat.dao.ProductInfoDao;
import com.danskin.wechat.entity.CategoryProduct;
import com.danskin.wechat.service.CategoryProductService;
import com.danskin.wechat.util.Page;

@Service
public class CategoryProductServiceImpl implements CategoryProductService{

	/*@Autowired
    private ProductInfoDao productInfoDao; */
	@Autowired
    private CategoryProductDao categoryProductDao; 
	@Override
	public List<CategoryProduct> findCategoryProduct(int mpId) {
		// TODO Auto-generated method stub
		return categoryProductDao.findCategoryProduct(mpId);
	}
	@Override
	public List<CategoryProduct> findCategoryProductList(Page page) {
		// TODO Auto-generated method stub
		return categoryProductDao.listPageFindCategoryProductList(page);
	}
	@Override
	public void insertCategoryProduct(CategoryProduct categoryProduct) {
		// TODO Auto-generated method stub
		categoryProductDao.insertCategoryProduct(categoryProduct);
	}
	@Override
	public void updateCategoryProduct(CategoryProduct categoryProduct) {
		// TODO Auto-generated method stub
		categoryProductDao.updateCategoryProduct(categoryProduct);
	}
	@Override
	public CategoryProduct findCategoryProductById(String id) {
		// TODO Auto-generated method stub
		return categoryProductDao.findCategoryProductById(id);
	}
	@Override
	public void deleteCategoryProduct(String id) {
		// TODO Auto-generated method stub
		categoryProductDao.deleteCategoryProduct(id);
	}
    
}
